import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity()
export class FilmList {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ default: '未命名的视频剪辑项目' })
  name: string;

  @Column('enum', { enum: ['person', 'group'], default: 'person' })
  role: string;

  @Column({ default: 0 })
  share: number;

  @Column()
  creator: string;

  @Column({
    type: 'timestamp without time zone',
    default: () => 'CURRENT_TIMESTAMP',
  })
  create_time: Date;

  @UpdateDateColumn({
    type: 'timestamp without time zone',
    default: () => 'CURRENT_TIMESTAMP',
  })
  update_time: Date;

  // 标识脚本是公共脚本还是个人脚本
  @Column('enum', { enum: ['user', 'public'], default: 'user' })
  film_type: string;
}
